<?php 
   
   /**
    * generate grid field table
    * @author Ta Van Chinh
    * @since 2/1/2014
   */
   class GridTable{
      
      /**
       * 
       * The constructor
      */
      public function __construct(){}
      
      /**
       * 
       * Open tag table
      */
      public function openTagTable(){
         echo '<table class="table dataTable table-bordered" id="tSortable">';
      }
      
      /**
       * 
       * Generate header table 
      */
      public function genHeaderTable($array_fields){
         if(count($array_fields) > 0){
            echo '<tr>
                     <th class="sorting_disabled selectallrow active" rowspan="1" colspan="1" style="width: 23px;">Chọn</th>';
            foreach($array_fields as $value){
               echo '<th class="sorting column-'.$value.'" tabindex="0" rowspan="1" colspan="1" style="">'.$value.'</th>';
            }
            echo '</tr>';
         }
      }
      
      /**
       * 
       * Generate body table
      */
      public function genBodyTable($array_content){
         
      }
      
      /**
       * 
       * Close table
      */
      public function closeTagTable(){
         echo '</table>';
      }
      
   }
?>